import './App.css';
import { Route, Redirect, Switch } from "react-router-dom";
import Index from './view/Index.jsx'
import Details from './view/Details.jsx'
import Search from './view/Search.jsx';
import Favor from './view/Favor.jsx'
import Login from './view/Login.jsx'
import Register from './view/Register.jsx'
import NotFound from './view/NotFound.jsx'

function App() {
  return (
    <div className="App">
      <Switch>
        <Route path='/index' component={Index} />
        <Route path='/search' component={Search} />
        <Route exact path='/details' component={Details} />
        <Route exact path='/favor' component={Favor} />
        <Route exact path='/login' component={Login} />
        <Route exact path='/register' component={Register} />
        <Redirect exact from='/' to='/index' />
        <Route path='*' component={NotFound} />
      </Switch>
    </div>
  );
}

export default App;
